package org.infodavid.common.persistence.exceptions;

import javax.persistence.PersistenceException;

/**
 * The Interface IErrorHandler.
 * @param <E> the element type
 */
public interface IErrorHandler<E extends PersistenceException> {

	/**
	 * Handle.
	 * @param type the type
	 * @param id the identifier or null
	 * @param error the error
	 * @return true, if successful
	 * @throws E the e
	 */
	@SuppressWarnings("rawtypes")
	boolean handle(final Class type, Object id, final Throwable error) throws E;
}
